﻿@model Rezene.Web.Models.ListPageViewModel

@if (Model.IsHome)
{
    <div class="span12">
        <h2 class="title-bg">GALLERIES</h2>
        @if (Model.Galleries.Any())
        {
            <div class="gallery">
                <div class="row clearfix">
                    <ul class="gallery-post-grid holder">
                        @foreach (var gallery in Model.Galleries)
                        {
                            <li class="span2 gallery-item">
                                <a href="@Url.Action("List", "Gallery", new {id = gallery.AmazonPath})">
                                    <img src="/assets/img/folder-gray-icon.png" />
                                </a>
                                <span class="project-details">
                                    @gallery.DisplayName
                                    @if (Model.IsAuthorized)
                                    {
                                        <a href="@Url.Action("EditGallery", "Editor", new {path = gallery.AmazonPath})"><span class="icon-pencil"></span>Edit</a>
                                    }
                                </span>
                            </li>
                        }
                    </ul>
                </div>
            </div>
        }
    </div>    
}